package com.heima.手机屏蔽身份证查找;

public class Huoqushenfenzheng {
    public static void main(String[] args) {
        String id="441323200210225356";
        String year=id.substring(6,10);
        String month=id.substring(10,12);
        String day=id.substring(12,14);
        System.out.println("出生日期为："+year+"年"+month+"月"+day+"日");

        //获取性别
        char ch=id.charAt(16);
        //利用ASCII码表进行字符转换0对应ASCII为48
        int num=ch-48;
        //System.out.println(num);

        if(num%2==0){
            System.out.println("性别：女");
        }else{
            System.out.println("性别：男");
        }
    }
}
